vindictusfandomcom_ru-20200214-history
Шаблон:СписокПерсонажей
}}}|lann}}|a|}} }}}|fiona}}|b|}} }}}|evie}}|c|}} }}}|karok}}|d|}} }}}|kai}}|e|}} }}}|vella}}|f|}} }}}|hurk}}|g|}} }}}|lynn}}|h|}} }}}|arisha}}|i|}} }}}|sylas}}|j|}} }}}|delia}}|k|}}}} }} |9=Req class::}}Lann, Req class::}}Fiona, Req class::}}Evie, Req class::}}Karok, Req class::}}Kai, Req class::}}Vella, Req class::}}Hurk, Req class::}}Lynn, Req class::}}Arisha, Req class::}}Sylas, Req class::}}Delia |0= |#default= |0|1}} |a=Req class::}}Lann |b=Req class::}}Fiona |c=Req class::}}Evie |d=Req class::}}Karok |e=Req class::}}Kai |f=Req class::}}Vella |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>1|, |1|1}} |b=Req class::}}Fiona |c=Req class::}}Evie |d=Req class::}}Karok |e=Req class::}}Kai |f=Req class::}}Vella |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>2|, |2|1}} |c=Req class::}}Evie |d=Req class::}}Karok |e=Req class::}}Kai |f=Req class::}}Vella |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>3|, |3|1}} |d=Req class::}}Karok |e=Req class::}}Kai |f=Req class::}}Vella |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>4|, |4|1}} |e=Req class::}}Kai |f=Req class::}}Vella |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>5|, |5|1}} |f=Req class::}}Vella |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>6|, |6|1}} |g=Req class::}}Hurk |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}} }}>7|, |7|1}} |h=Req class::}}Lynn |i=Req class::}}Arisha |j=Req class::}}Sylas |k=Req class::}}Delia}}}}}}}}}}}}}}}}}} Explanation The first part of the code defines a variable char which is an ordered list of a-f corresponding to the characters in order from Lann to Vella based on whether or not the name of the corresponding character is present in }. This is done by looking for each character in order and adding their letter to the string if they are in the input. So if we recieved "Vella Evie Fiona" we would check for Lann, no lann so we skip 'a', check for Fiona, we have a Fiona so add a 'b', check for Evie, we have an Evie so we add a 'c', etc. until char would equal "bcf". b for Fiona, c for Evie, and f for Vella. The second part is a series of switches that basically goes through char one letter at a time, turning the ordered letters into a comma separated list. So with our example "Vella Evie Fiona" which turned into "bcf" we find 'b' first and add "Fiona" to the beginning of the list. The string is longer than 1 so it adds ", " and keeps going where it finds a 'c' which means it adds "Evie". The string is longer than 2 so it adds ", " and continues to the 'f' which adds "Vella". The string is not longer than 3 so it stops. We end up with "Fiona, Evie, Vella." There are a couple special cases in the second half. If char has 0 length the result is immediately "" rather than going through the list. If char is 6 letters long all the characters are in the list. There is only one combination of all things within a set, so it just uses a predefined list. Adding a new character: *In this first half copy the }}}|}}||}}}} code and insert it with the proper values. The order of these statements is what determines the order of the letters, and hence the resulting list. *In the second part increment the first case of the switch (currently "6=" so it would become "7=") and add the new character to the predefined list. *Add the new character and it's letter to each of the switch statements that switch on *Follow the pattern of the |#default case of the switch. The last switch should look like: ...}} }}>(number of characters-1)|, |(number of characters-1)|1}} |(Second to last letter)=(second to last char) |(last letter)=(last char)}} Usage Учитывая список символов, это шаблоны разбивает и форматирует их как ссылки. Example produces produces produces produces Category:Шаблоны